#ifndef MODELMANAGER_H
#define MODELMANAGER_H

class Plane;
class RenderSystem;
class ModelManager
{
	struct Vertex {
		Vector3 position;
		Vector2 texcoord;
		Vector3 normal;
	};


public:
	ModelManager(RenderSystem* render_system, const String& model_directory);
	virtual ~ModelManager(void);
	void CreatePlane(const String& id, float x, float y);

	Renderable* Create(const String& model_filename);
	Renderable* GetModel(const String& id);
	void Destroy(Renderable* renderable);

private:
	void LoadModel(const String& model_filename, Renderable* renderable);

private:
	RenderSystem* m_render_system;
	std::map<String, Renderable*> m_models;
	String m_directory;
};

#endif //MODELMANAGER_H